[runtime] Simplify generated signatures by using native types. - #2440
Closed
rolfbjarne wants to merge 1 commit into
Closed
[runtime] Simplify generated signatures by using native types.#2440rolfbjarne wants to merge 1 commit into
rolfbjarne wants to merge 1 commit into
Conversation
There's no need to generate a 32-bit and 64-bit signature, because the binding generator will automatically generate those based on any native types.
Contributor
|
Build failure |
dalexsoto
approved these changes
Aug 8, 2017
Contributor
|
@rolfbjarne that's the same I tried earlier (and ping'ed you about). I also ran into the same issues as the bots. |
Member
Author
|
@spouliot yeah, I tried to repro locally, but I didn't try the right test. |
Member
Author
|
The problem here is the mix of a native enum and native types in the signature. The generator produces: if (IntPtr.Size == 8) {
ret = global::ObjCRuntime.Messaging.xamarin_simd__Matrix4_objc_msgSendSuper_Int64_CGSize_nfloat_nfloat (this.SuperHandle, Selector.GetHandle ("projectionMatrixForOrientation:viewportSize:zNear:zFar:"), (Int64)orientation, viewportSize, zNear, zFar);
} else {
global::ObjCRuntime.Messaging.xamarin_simd__Matrix4_objc_msgSendSuper_stret_int_CGSize_nfloat_nfloat (out ret, this.SuperHandle, Selector.GetHandle ("projectionMatrixForOrientation:viewportSize:zNear:zFar:"), (int)orientation, viewportSize, zNear, zFar);
}the binding generator automatically generates signatures for the 32-bit and 64-bit types as well, which means that when declaring a signature containing
but if the first argument is a native enum, bgen generates calls to:
which doesn't match the binding generator does, thus the need for the manual int/long signatures instead of nint signatures for native types. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There's no need to generate a 32-bit and 64-bit signature, because the binding
generator will automatically generate those based on any native types.